.mu-container {
  box-sizing: border-box;
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 50px 100px 50px;

  color: var(--editorColor);
}

.mu-container p,
.mu-container blockquote,
.mu-container ul,
.mu-container ol,
.mu-container dl,
.mu-container table,
.mu-container figure {
  margin: 0;
  padding: .5em 0;
}

.mu-container h1,
.mu-container h2,
.mu-container h3,
.mu-container h4,
.mu-container h5,
.mu-container h6 {
  position: relative;

  margin-top: 0;
  margin-bottom: 0;
  padding: .5em 0;

  color: var(--editorColor80);
  font-weight: bold;
  line-height: 1.4;

  cursor: text;
}

.mu-container h1 {
  font-size: 1.875em;
}

.mu-container h2 {
  font-size: 1.5em;
}

.mu-container h3 {
  font-size: 1.375em;
}

.mu-container h4 {
  font-size: 1.25em;
}

.mu-container h5 {
  font-size: 1.125em;
}

.mu-container h6 {
  font-size: 1em;
}

/* block quote */
.mu-container  blockquote {
  position: relative;

  margin-right: 0;
  margin-left: 0;
  padding: 0 1em;

  font-size: 1.1em;
}

.mu-container  blockquote::before {
  position: absolute;
  top: 0;
  left: 0;

  display: block;
  width: 3px;
  height: 100%;

  background: var(--editorColor50);

  content: '';
}

.mu-container blockquote blockquote {
  padding-right: 0;
}

/* thematic break */
.mu-thematic-break {
  position: relative;
}

.mu-thematic-break:not(.mu-active)::before {
  position: absolute;
  top: .8em;
  left: 0;

  display: block;
  width: 100%;
  height: 1px;

  background: var(--editorColor10);

  content: '';
}

.mu-thematic-break.mu-active::before {
  content: none;
}

.mu-thematic-break:not(.mu-active) > .mu-thematic-break-content {
  opacity: 0;
}

/* code block */
.mu-code-block,
.mu-html-container,
.mu-math-container {
  position: relative;

  margin-top: 1.5em;
  padding: 1em;

  color: var(--editorColor50);
  font-size: 90%;
  font-family: "DejaVu Sans Mono", "Source Code Pro", "Droid Sans Mono", Consolas, monospace;
  line-height: 1.6;

  background: var(--codeBlockBgColor);
  border: 1px solid var(--editorColor10);
  border-radius: 3px;
}

span.mu-language-input {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;

  min-width: 20em;

  font-weight: 600;
  font-size: .8em;

  opacity: 0;
}

.mu-code-block.mu-active .mu-language-input {
  top: -1.8em;
  z-index: initial;

  opacity: 1;
}

.mu-code-block.mu-active .mu-language-input:empty::after {
  color: var(--editorColor10);

  content: 'Input Language Identifier...';
}

.mu-code-block.mu-fenced-code.mu-active .mu-language-input {
  left: 30px;
}

/* loose tight list */
.mu-tight-list > li > p {
  margin: 0;
  padding: 0;
}

/* order list and bullet list */
ol.mu-order-list,
ul.mu-bullet-list {
  padding-left: 1em;
}

ul.mu-bullet-list:first-child,
ol.mu-order-list:first-child {
  margin-top: 0;
}

ul.mu-bullet-list:last-child,
ol.mu-order-list:last-child {
  margin-bottom: 0;
}

/* task list */
ul.mu-task-list {
  padding-left: 1em;
}

li.mu-task-list-item {
  position: relative;

  list-style-type: none;
}

li.mu-task-list-item > input[type="checkbox"] {
  position: absolute;
  top: .2em;
  left: -23px;

  width: 12px;
  height: 12px;

  transform-origin: center;
  cursor: pointer;

  transition: all .2s ease;
}

li.mu-task-list-item > input.mu-checkbox-checked ~ * {
  color: var(--editorColor50);
}

li.mu-task-list-item > input[type="checkbox"]::before {
  position: absolute;
  top: -2px;
  left: -2px;

  display: inline-block;
  box-sizing: border-box;
  width: 18px;
  height: 18px;

  background-color: var(--editorBgColor);
  border: 2px solid var(--editorColor50);
  border-radius: 50%;

  transition: all .2s ease;

  content: '';
}

li.mu-task-list-item > input::after {
  position: absolute;
  top: 1px;
  left: 4px;

  display: inline-block;
  width: 8px;
  height: 4px;

  border: 2px solid var(--editorBgColor);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) scale(0);
  transform-origin: bottom;

  transition: all .2s ease;

  content: '';
}

li.mu-task-list-item > input.mu-checkbox-checked::after {
  transform: rotate(-45deg)  scale(1);
}

li.mu-task-list-item > input.mu-checkbox-checked::before {
  background: var(--themeColor);
  border-color: var(--themeColor);
  box-shadow: 0 3px 12px 0 var(--selectionColor);
}

/* table */
.mu-table {
  margin: 0;
}

.mu-table-inner {
  padding: 0;

  word-break: initial;

  border-collapse: collapse;
}

.mu-table-inner tr {
  margin: 0;
  padding: 0;
}

.mu-table-inner tr th {
  position: relative;

  margin: 0;
  padding: 6px 13px;

  font-weight: bold;
  text-align: left;
}

.mu-table-inner tr td {
  position: relative;

  margin: 0;
  padding: 6px 13px;

  text-align: left;
}

.mu-table-inner tr th::before,
.mu-table-inner tr td::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  box-sizing: border-box;
  width: calc(100% + 1px);
  height: calc(100% + 1px);

  border: 1px solid var(--tableBorderColor);

  content: '';
  pointer-events: none;
}

.mu-table-inner tr th:first-child,
.mu-table-inner tr td:first-child {
  margin-top: 0;
}

.mu-table-inner tr th:last-child,
.mu-table-inner tr td:last-child {
  margin-bottom: 0;
}

.mu-table-inner td[data-align="left"] {
  text-align: left;
}

.mu-table-inner td[data-align="center"] {
  text-align: center;
}

.mu-table-inner td[data-align="right"] {
  text-align: right;
}

/* html block and math block */
figure.mu-html-block > .mu-html-container,
figure.mu-math-block > .mu-math-container {
  position: absolute;
  z-index: -1;

  width: 0;
  height: 0;
  margin-top: 0;
  margin-bottom: 0;
  overflow: visible;

  opacity: 0;
}

figure:not(.mu-active).mu-html-block .mu-html-container,
figure:not(.mu-active).mu-math-block .mu-math-container {
  overflow: hidden;
}

figure.mu-active.mu-html-block .mu-html-container,
figure.mu-active.mu-math-block .mu-math-container {
  position: static;
  z-index: 1;

  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;

  opacity: 1;
}

figure.mu-html-block .mu-html-preview,
figure.mu-math-block .mu-math-preview {
  display: block;
  width: 100%;
}

figure.mu-html-block .mu-html-preview > pre {
  padding: 0 1rem;

  white-space: pre-wrap;

  background: inherit;
  border: 0;
  border-radius: 0.3em;
}

figure.mu-html-block.mu-active .mu-html-preview {
  display: none;
}

/* math block */
figure.mu-math-block {
  position: relative;
}

figure.mu-html-block:not(.mu-active):hover,
figure.mu-math-block:not(.mu-active):hover {
  background: var(--editorColor04);
}

figure.mu-math-block div.mu-math-preview {
  width: 100%;

  text-align: center;
}

figure.mu-math-block div.mu-math-preview > svg {
  width: 100%;
}

figure.mu-active.mu-math-block > div.mu-math-preview {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  z-index: 10000;

  box-sizing: border-box;
  width: 100%;
  padding: .5rem;

  background: var(--floatBgColor);
  border: 1px solid var(--floatBorderColor);
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  transform: translateX(-50%);
}

figure.mu-math-block span.mu-codeblock-content:first-of-type:empty::after {
  color: var(--editorColor10);

  content: 'Input Mathematical Formula...';
}

/* code html math ...code block style */
pre.mu-active.mu-front-matter::before,
pre.mu-active.mu-front-matter::after {
  content: '---';
}

pre.mu-active.mu-math-container::before,
pre.mu-active.mu-math-container::after {
  content: '$$';
}

pre.mu-active[data-role="mermaid"]::before {
  content: '``` mermaid';
}

pre.mu-active[data-role="flowchart"]::before {
  content: '``` flowchart';
}

pre.mu-active[data-role="sequence"]::before {
  content: '``` sequence';
}

pre.mu-active[data-role="vega-lite"]::before {
  content: '``` vega-lite';
}

pre.mu-active.mu-fenced-code::before,
pre.mu-active.mu-fenced-code::after,
pre.mu-active[data-role="mermaid"]::after,
pre.mu-active[data-role="flowchart"]::after,
pre.mu-active[data-role="sequence"]::after,
pre.mu-active[data-role="vega-lite"]::after {
  content: '```';
}

pre.mu-active.mu-front-matter::before,
pre.mu-active.mu-front-matter::after,
pre.mu-active[data-role="mermaid"]::before,
pre.mu-active[data-role="mermaid"]::after,
pre.mu-active[data-role="flowchart"]::before,
pre.mu-active[data-role="flowchart"]::after,
pre.mu-active[data-role="sequence"]::before,
pre.mu-active[data-role="sequence"]::after,
pre.mu-active[data-role="vega-lite"]::before,
pre.mu-active[data-role="vega-lite"]::after,
pre.mu-active.mu-fenced-code::before,
pre.mu-active.mu-fenced-code::after,
pre.mu-active.mu-math-container::before,
pre.mu-active.mu-math-container::after {
  position: absolute;
  left: 0;

  color: var(--editorColor30);
  font-weight: 100;
}

pre.mu-active.mu-front-matter::before,
pre.mu-active[data-role="mermaid"]::before,
pre.mu-active[data-role="flowchart"]::before,
pre.mu-active[data-role="sequence"]::before,
pre.mu-active[data-role="vega-lite"]::before,
pre.mu-active.mu-math-container::before,
pre.mu-active.mu-fenced-code::before {
  top: -20px;
}

pre.mu-active.mu-front-matter::after,
pre.mu-active[data-role="mermaid"]::after,
pre.mu-active[data-role="flowchart"]::after,
pre.mu-active[data-role="sequence"]::after,
pre.mu-active[data-role="vega-lite"]::after,
pre.mu-active.mu-math-container::after,
pre.mu-active.mu-fenced-code::after {
  bottom: -23px;
}

/* empty */

.mu-empty {
  color: var(--editorColor50);
  font-size: 14px;
  font-family: monospace;
  font-style: italic;
  text-align: center;
}

/* content */
.mu-content {
  display: block;

  white-space: pre-wrap;
  word-break: break-word;

  outline: none;
}

.mu-table-cell-content {
  min-width: 10em;
}

